﻿using System;
using CraterCity.Service.Components.DataContract;
using NASA.BeAMartian.Controls.Images;
using NASA.BeAMartian.Controls.News;
using Microsoft.TownHall.ServiceClient;

namespace NASA.BeAMartian.Model
{
    public class ApplicationContext
    {
                /// <summary>
        /// The singleton ApplicationContext.
        /// </summary>
        private static ApplicationContext singleton = null;

        /// <summary>
        /// Get the Singleton ApplicationContext
        /// </summary>
        public static ApplicationContext Instance
        {
            get
            {
                if (ApplicationContext.singleton == null)
                {
                    ApplicationContext.singleton = new ApplicationContext();
                }

                return ApplicationContext.singleton;
            }
        }

        /// <summary>
        /// Private due to singleton. Use ApplicationContext.Instance.
        /// </summary>
        private ApplicationContext() { }

        /// <summary>
        /// Get/Set the user Id.
        /// </summary>
        public string DisplayName { get; set; }

        /// <summary>
        /// Get/Set the crater task data. updated each time you save a crater task.
        /// </summary>
        public TaskData CraterTaskData { get; set; }

        /// <summary>
        /// Get/Set the tagging task data. updated each time you save a mapping task.
        /// </summary>
        public TaskData TaggingTaskData { get; set; }

        public ImageGalleryItem ImageGalleryItemData { get; set; }

        public ImageGallery ImageGalleryData { get; set; }

        public NewsItem NewsItemData { get; set; }

        public User UserData { get; set; }

        public bool AppStarted { get; set; }

        public int MapRoomTaskSequence { get; set; }
    }
}
